﻿using System.Collections.Generic;

namespace ZOIL.DataModel
{
    /// <summary>
    /// ViewModel for the BaseCollection. Purpose of this class is to forward the Items and ViewStates Properties.
    /// This class is expected to be extended by a concrete ViewModel class
    /// </summary>
    public class CollectionViewModel<T> : BaseViewModel
    {
        public CollectionViewModel()
        {
            
        }

        public CollectionViewModel(IList<T> model)
        {
            base.Model = model;
        }

        /// <summary>
        /// Holds the Items of the BaseCollection
        /// </summary>
        public new ICollection<T> Model
        {
            get { return base.Model as ICollection<T>; }
        }
    }
}